/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.shop.entity.category;

import com.fasterxml.jackson.annotation.JsonBackReference;
import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.TreeEntity;

/**
 * 商品分类Entity
 * @author 罗天文
 * @version 2018-05-15
 */
public class HkShopCategory extends TreeEntity<HkShopCategory> {
	
	private static final long serialVersionUID = 1L;


	private String code;		// 编码
	private String level;		// 级别
	private String imgSrc;		// 图片地址
	private String imgRank;		// 图片序号
	
	public HkShopCategory() {
		super();
	}

	public HkShopCategory(String id){
		super(id);
	}

	@JsonBackReference
	public HkShopCategory getParent() {
		return parent;
	}

	public void setParent(HkShopCategory parent) {
		this.parent = parent;
	}




	@Length(min=0, max=20, message="编码长度必须介于 0 和 20 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=11, message="级别长度必须介于 0 和 11 之间")
	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}
	
	@Length(min=0, max=200, message="图片地址长度必须介于 0 和 200 之间")
	public String getImgSrc() {
		return imgSrc;
	}

	public void setImgSrc(String imgSrc) {
		this.imgSrc = imgSrc;
	}
	
	@Length(min=0, max=11, message="图片序号长度必须介于 0 和 11 之间")
	public String getImgRank() {
		return imgRank;
	}

	public void setImgRank(String imgRank) {
		this.imgRank = imgRank;
	}

}